Added a lot of changes to both the code and the structure, i'll update again soon with a more detailed commit.