some cleanup
bug fixes + check existing entity on create