Cleaning database; Handling return codes;