Cleaned up internal API