Reworked brick API to be more generic