Fixed some problems in circularity feature, added to main program