Code cleanup. Add POST support