code cleanup and app basic shell