Adding documentation, unit testing