removed extra copies of loki files
fixed compilation errors