Got the basic functions working again