Reorganize structure of project

Reorganized the project a bit. Tests are still a mess, but I need to fix those on master...