Refactored.

* Broke different stages into new classes.
* Removed $dev flag.