Issue #2: Added header for common definitions in back-end library and cleaned-up the code a bit