Main index file: Define base and library path before imports.
Main index file: Moved some constant definition.

Some constants could be needed to determine behavior of certain files on
import. To avoid issues with duplicate code these constants are defined
before imports.