Feature/search inbox

Be careful on variables declaration in JavaScript. Quoting [mozilla.org](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var):

> Variable declarations, wherever they occur, are processed before any code is executed. The scope of a variable declared with `var` is its current execution context, which is either the enclosing function or, for variables declared outside any function, global.