Refactor, organize and delete unused classes