FIixed numerous bugs; added tropism calculations