Clean up code: missing cache and external classes loading and testing