Fixed some types and done some testing