Moved each function to individual files

* More space-efficient linkage