in this freer environment , he diligently applied himself to the study of languages , philosophy and the sciences , in collusion with his companion and friend alexander , the son of my secretary ioanis .