added functionality to allow storing via array, fixed bug with clean that simply wiped everything when array was passed, added tests