Added storage capabilities + various code improvements