Kinda finished, some refactoring needed maybe