Added more abstraction to serial driver interface, removed redundant code