Added implementation for Event and Error objects. Basic prototype library functionality now works