Fixed more minor bugs, started implementing the analyse command.