Started testing and fixing errors