Fixed application bug and cleaned up layout