Small fixes

While browsing through the code I found a few small bits of unused code, which I removed.