Added clear method, made constructor