Cleaned up code, altered api format slightly