major refactor with new classes and roles