Cleaned up code for clarity