refactored views for basic restful POST and GET functionality