Refactored, added save, added flash