Tidied up, moved main script to app.’s