Refactoring classes, created a class for compiling and big changes