Transferred some changes from demo branch, mainly plot cosmetics