Refactor code to the separate c file

Originally the code was in single .h file so that avr-gcc invocation with
-fwhole-program would be really simple and #define could be used as
feature selector.