Cleanup and idiomatic structure