More code moved to attribute bindings and cleaned