Fix Application inheritance; refactor tests; test install and upgrade date logic