Improve encapsulation in HorusYap and perform other small refactorings