Inline several functions for increased performance