Handeled relative path in level loading, added cleanup to prevent memory leaks