Refactored usage of ActiveResource to solve some communication issues.