Cleanup of code for easier reading and to easy the creation of more things