private String solveAtom(String expression) throws Exception {
        //Empty string not allowed here. :(
        if (expression.isEmpty()) {
            throw new Exception("(Contains) Empty expression.");
        }

        //Code derived from first character.
        switch (expression.charAt(0)) {
            //Functions
            case '@':
                String funcString
                        = func.get(Integer.parseInt(expression.substring(1)));
                //ContainingClassFile.FunctionName
                String funcPath
                        = funcString.substring(1, funcString.indexOf('['));
                if (!funcPath.contains(".")) {
                    funcPath = "~." + funcPath;
                }
                //Variable to execute function. (via MathExFunctions interface)
                MathExFunctions funcLoader;

                //Set required class of functions.
                switch (funcPath.split("\\.")[0]) {
                    //TODO: Add other classes of functions.
                    //Default is MathDefaultFunc
                    default:
                        funcLoader = new MathDefaultFunc();
                }

                //Execute function and return result.
                return funcLoader.execute(funcPath.split("\\.")[1],
                        funcString.substring(funcString.indexOf('[') + 1,
                                funcString.lastIndexOf(']')), var);
            //Radix conversions &16_, &
            case '&':
                try {
                    return String.valueOf(
                            Integer.valueOf(
                                    expression.substring(expression.indexOf('_')
                                            + 1),
                                    Integer.valueOf(expression.substring(
                                                    1, expression.indexOf('_')
                                            ))
                            )
                    );

                } catch (NumberFormatException e) {
                    throw new Exception("Radix conversion error.");
                }
            //Variables
            case '$':
                if (var.containsKey(expression.substring(1))) {
                    return var.get(expression.substring(1)).toString();
                } else {
                    throw new Exception("Unknown variable name.");
                }

            //Expression is a number or what?
            default:
                return expression;
        }

    }