Updated to fix compile errors, working struct