Rewritten the application to actually work