Fix transaction usage and add initial implementation of rest controller