more "documentation", fix some stupid bugs, this should be the first commit where I think it does what I want it to