Seconds version, more stable, menu added, cleaned up code