Cleaned up + commented code