Clean up codes a little