Refactoring ldev.c
Adding filter and cleaning up a bit