Big Refactor.

Created 4 folders in src to keep the code arranged.