WSN-Erlang: a Functional, High Level Approach to WSN Development