Cleaned up coding