Moved reveiver into lib