Multiple fixes. Removed deprecated %str interpreter and simplified functions.