Made simulation working on non-RPI (no need for real hardware)
Cleaned up code partially