Major refactor, don't expose constructor of Tiapp