parse the api outputs into correct Ruby objects + some cleanup

wow much revised pls merge