Refactored analyis and added amphibians

Re factored the data processing and analysis functions to be more
general and added analysis of amphibian data. EVerything still
consistent with R file results.