Some cleaning made. Added code to find out if editor is sub or main,
and setting part name accordingly.