made shape abstract and reorganized some imports