Tidy-up of repository top level

    * C code moved to "lib" subdirectory
    * Removed deprecated "scripts" directory