partial cleanup, partial documentation, lots of half efforts, i think a bug was fixed