Done: added comments, WIP: testing.