Finished version 1.0. TODO: comment classed and write doc