Little optimizations & cleanup