Re-factors app packages