General clean-up and documentation

Add more function-level documentation
Add lint make target (using Google's cpplint.py)
Add BSD License header