Optimizations and expanded basic utility functions.