Adds minor code optimizations