Completely implemented REST2, but needs testing and better code organization