Reorganize, added comments