Previous version worked, moved serial functions to new .c file