Finished serial handling

To be tested. No arduino for now :/