add rw.gen (WIP, will probably disappear again)
template cleanup
make static work.