Preparing main to use php