Add goflycheck. Refactor code