Fix memory usage

* Fix memory usage putting strings in flash memory
* Small refactoring
* Added automatic startup after 30s