Using Zimit as a frontend framework. Tidied up the code a little bit