Named functions -> easier to follow in Chrome profiler.
Removed test - api not meant to be defensive.
Perf improvements after profiling. Removed some code. Cleaned up exports.