added rest of return types
finished library function signatures
significant rewrite to clean up and optimize