Appstore cleanup and refactoring