Fixed some imports, cleanup some code, fixed some documentations