Cleaned up lua interface