Simplified code, move dependencies and updated docs