Fixed valgrind leak-check warnings.
main now ends by itself after 5 seconds.
Fixed a segfault in free_entry.
Fixed a memory leak due to ewmh use.