numerous changes

add new operations
change apr file names
fix memory leaks