Update

Reorganized code, made it cleaner, split different classes into
different files