Major changes, please check commits