Closes #4, added REST method support