Small fixes, simple search function, pickling for debugging