Added comments and examples

Added comments, and examples. Also fixed up bugs that came up :)
Random change