Fixed tendency of apps to folder unexpectedly.
Cleaned up commented merge code.