Improve layout performance

Instead of reading the layout file every time they're all parsed into a HashMap in the beginning.