Fixed merge problem. Closed #1, #14, #15, #16, #17, #18, #28, #31, #32