EDIT: Entire functional code without comments