Added javadoc and reformatted the App singleton class. Refactored current endpoint tracking: now it uses enum EndpointType instead of int values