Reorganized the source to have private parts accessible

Will work with the same structures in the helper too, to simplify the communication.