Fixes some bugs & adds some shape-editing functionalities.