Fixed typo
Made PSR-0 compatible and added a globalfunctions.php to define globally available functions