Bugs fixed and now fully working