fixed docs
moved api classes into separate file