Improved the build and added copy deriving clauses