Code is now modular, modes can be added easily, needs more documentation, though