Minor fixes

- Minor misc. tweaks and optimizations