SFM: add ransac unit test, fix code styling issues and further fixes