Almost ready to pull to master. Still need to write some test cases, and hook it up to Travis CI/ Rust CI