Big restructuring
add some side-stuff