Some major rework. (still not finished)

testing...