Reformats code
Implements app setup functionality