Implemented getRevisisions(), added optimizations, making it more
modular, one step at a time