Cleaned up/commented code