Commented code, cleaned up