Fix style and add DB support.