cleaned up code duplicates, broke down API declaration into more files
renamed and added targets