change order of array values for binding and other small changes
fixes #6