Cleaned up. Now takes filename from cli