Fixed some issues
Refactored layout files