Related to issue #25 and #19. All files in core now have docstrings in the numpydoc format along with some minor refactorings.