Made lda, and changed structure of optRF