Simple JavaScript Class for OOP and event driven