Remove apply

Turns out the apply function wasn't as big of a performance optimization as I expected in most cases. It has been removed in order to simplify the source code.