More changes to work as an arduino library