[Core] Cleaned code, refactored console and process wrappers.