Code cleanup, POST bugfix