be more generic with our types
go with gphats more idiomatic version
add in the Topic ($_)
some formatting cleanup and removing unnecessary type definitions