LRU caching

Hey, so I implemented some simple LRU caching and also cleaned up a little. Image names/dimensions are in the config now, and static routing should be fixed.