converted more code to non-api
added pll
enabled 50Mhz clock, set period correclt, integrated pll