various fixes and new brick class