Added json functionality
Started fill function.