major rework

seperated collection from rendering
cleaned html
added lots of helper functions