Some very little optimizations and cleaning