Added bindonce.
Added main state. Applied bindonce attributes.
Merge branch 'bindonce' into dev