Search functionality + some minor bug fixes