Minor bug fixes. SNR method is starting to give reasonable results.