Cleaned temp dirs
Added BUILD_AMD to the compiler
Added AMD constant compilation definitions
Added preroute method to controller