Fixed some formatting errors in core.go, and started implementing tests. Two unit tests exist so far.