Smart namespace parsing in storage engine

Added namespace parsing for store/retrieve and better empty checking.