Refactorize the code

* Mostly renaming classes and files
* Some clean-ups