Refactored status codes - integrated different handling