Add some static keywords, clean some header includes
time.h is Arduino specific, ignore and redefine time_t
Don't concatenate c files into the main project
Make the code slightly better practice