Fixed bugs, created ResourceHandler