Finished implementing square-finishing conditions