Local database structure added, command behavior improved, small bug fix