Add some documentation, move build to package

This should fix the mentioned bug in the comments. I added some documentation, and definitly would like to add more documentation.