Cleaned up the code even more