Minor effeciency updates and cleanup