Updating code style, checking for some bugs before final testing for 1.1.