just another code dump :(
with various bug fixes.