Moved bootstrap code into central lib/bootstrap.php