Update the existing records properly
Add a simple command-line interface
Clean up codes