Fixed naming conflicts and other minor bits.