Moved filenames finding to a smarter (read: not as retarded) spot. The server still needs to be completely refactored