Added clear function, fixed bug in attributes and uniforms