Major overhaul of the whole system

The kernels and different modes are now in separate files. This
makes the whole code base more modular