Ported Orbitlines to library

Starting to restructure main files