Implement and refactor some classes

T/O