Cleanup and improve file layout