Refactor App and add start function