Changed .gitignore
Simplified code, generalized tests and benchmarks, added javadoc