finally cleaned up code, fixing weird crashes due to reactivity
added a template for the main application