Cleaned up bus generator code