Seperated into files, plus @docs
Added a few functions, fixed some bugs