re-organized compiler and function APIs; spaces align